<?php 
	class Advertisings extends CI_Model{
	 	function __construct(){
        	parent::__construct();
    	}
		
		function get_ad_list($conditions = array()) {
			$where = "WHERE 1=1 AND status = 1";
			if(!empty($conditions['ad_position_sign'])) {
				$where .= " AND ad_position_sign = '". $conditions['ad_position_sign'] ."'";
			}
			$sql = "SELECT id,ad_position_sign,ad_type,ad_name,ad_url,top_id,ad_image_url,sort,status,add_time FROM ".$this->db->dbprefix('advertising')." ";
			$sql.= $where;
			$result = $this->db->query($sql)->result_array();
			return $result;
		}
    }